{extend name="admin@common/main"/}
{block name="body"}
    <div class="main-title">
        <h2>{:lang('_PACK_STEP_ONE_')}
            <small>{:lang('_PACK_STEP_ONE_VICE_')}</small>
        </h2>
    </div>

    <div class="with-padding">
        <div class="clearfix">
            <div class="alert alert-info">
                {:lang('_PACK_MODULE_NOW_')}{:lang('_COMMA_')}<strong>{$module.alias}-{$module.name}</strong>
            </div>
        </div>
        <form action="{:url('module2')}" method="post">
            <div class="clearfix">
                <div class="col-xs-12">
                    <p class="lead">{:lang('_PACK_DETECTED_MENU_TREE_')}</p>
                    <blockquote>
                        {volist name="menus" id="one"}
                            {eq name="one.hide" value="1"}
                                {php}$class='text-mute';{/php}
                            {else/}
                                {php}$class='text-primary';{/php}
                            {/eq}
                            <span class="{$class}"> 
                                <p>
                                    {:lang('_BRACKETS_LEFT_')}1{:lang('_CLASS_')}{:lang('_BRACKETS_RIGHT_')}{$one.id}-{$one.title}-{$one.url}
                                </p>
                            </span>
                            {empty name="one._"}
                            {else/}
                                {volist name="one._" id="two"}
                                    {eq name="two.hide" value="1"}
                                        {php}$class1='text-mute';{/php}
                                    {else/}
                                        {php}$class1='text-primary';{/php}
                                    {/eq}
                                <span class="{$class1}"><p>
                                    &nbsp; &nbsp; &nbsp; &nbsp;{:lang('_BRACKETS_LEFT_')}2{:lang('_CLASS_')}{:lang('_BRACKETS_RIGHT_')}{$two.id}-{$two.title}-{$two.url}
                                </p></span>
                                    {volist name="two._" id="three"}
                                        {eq name="three.hide" value="1"}
                                            {php}$class1='text-mute';{/php}
                                            {else/}
                                            {php}$class1='text-primary';{/php}
                                        {/eq}
                                <span class="{$class1}"><p>
                                    &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{:lang('_BRACKETS_LEFT_')}3{:lang('_CLASS_')}{:lang('_BRACKETS_RIGHT_')}{$three.id}-{$three.title}-{$three.url}
                                </p></span>
                                    {/volist}
                                {/volist}
                            {/empty}
                        {/volist}
                    </blockquote>
                </div>
                <div class="col-xs-12">
                    <p class="lead">{:lang('_PACK_SCRIPT_PREVIEW_')}</p>
                    <textarea name="menus" class="form-control" style="height: 200px">{:json_encode($menus)}</textarea>
                </div>
            </div>

            <div class="clearfix" style="margin-top:10px;">
                <a class="btn btn-lg btn-default" href="{:url('module')}">
                    {:lang('_STEP_PREV_')}
                </a>
                <a class="btn btn-lg btn-default" href="{:url('module1')}">
                    <i class="icon-refresh"></i> {:lang('_DETECT_RE_')}
                </a>
                
                <button type="submit" id="next_step" style="width: 300px" class="btn btn-lg btn-success">
                   {:lang('_STEP_NEXT_')}
                </button>
            </div>
        </form>
    </div>
{/block}